package com.lc.sell.mapper;

import com.lc.sell.entity.Order;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lc.sell.vo.OrderListVO;
import com.lc.sell.vo.UserOrderListVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 龙晨
 * @since 2022-02-01
 */
@Mapper
public interface OrderMapper extends BaseMapper<Order> {

    // 查询新订单
    List<OrderListVO> findAllNewOrder(@Param(value = "mid") Integer mid);

    // 修改订单状态
    void updateOrderStatus(@Param(value = "oid")String oid,@Param(value = "status") Integer status);

    //  根据商户id查询订单详情
    List<Order> orderList(@Param(value = "mid") Integer mid);

    // 根据用户id查询订单
    List<UserOrderListVO> userOrderList(@Param(value = "uid")Integer uid);
}
